package ZJX_router

import (
	"TCP-sever/interface"
	"TCP-sever/net"
	"fmt"
)

type MyRouter1 struct {
	ZJX_net.BaseRouter
}

func (r *MyRouter1) Handler(request ZJX_interface.IRequest) {
	id := request.GetMsgId()
	data := request.GetData()

	fmt.Println(".................in router1 msgId =", id)
	request.GetConnection().SendMsg(id, data)
}

type MyRouter2 struct {
	ZJX_net.BaseRouter
}

func (m *MyRouter2) Handler(request ZJX_interface.IRequest) {
	id := request.GetMsgId()
	data := request.GetData()

	fmt.Println("...................in router2 msgId =", id)
	request.GetConnection().SendMsg(id, data)
}
